import request from '@/utils/request'


//提交反馈建议
export function saveFeedback(data) {
    return request({
        url: '/boss/tc-feedback/tc-feedback-add',
        method: 'post',
        data: data
    })
}

//我的课件(BOSS)
export function getUserCourseList(data) {
    return request({
        url: '/boss/tc-user-course/tc-user-course-list',
        method: 'post',
        data: data
    })
}
//我的课件(BOSS)-审批通过的
export function getApproveList(data) {
    return request({
        url: '/boss/tc-approve-history/tc-approve-history-list',
        method: 'post',
        data: data
    })
}


//我的课件(BOSS)-新增
export function addCourse(data) {
    return request({
        url: '/boss/tc-user-course/tc-user-course-add',
        method: 'post',
        data: data
    })
}

//我的课件(BOSS)-删除
export function delCourse(data) {
    return request({
        url: '/boss/tc-user-course/tc-user-course-delete',
        method: 'post',
        data: data
    })
}

//我的课件(BOSS)-查询有效课件列表(BOSS)
export function getValidCourseList(categoryId) {
    return request({
        url: `boss/tc-course/tc-valid-course-list/${categoryId}`,
        method: 'get'
    })
}


//发送短信验证码（找回密码）
export function sendCode(data) {
    return request({
        url: `anon/findpassword/send-sms-code`,
        method: 'post',
        data:data
    })
}
//验证短信验证码（找回密码）
export function verifyCode(data) {
    return request({
        url: `anon/findpassword/verify-sms-code`,
        method: 'post',
        data:data
    })
}

//验证短信验证码（找回密码）
export function changePSW(data) {
    return request({
        url: `anon/findpassword/change-password`,
        method: 'post',
        data:data
    })
}
//编辑课件操作记录(BOSS)
export function courseTime(data) {
    return request({
        url: `boss/tc-user-course/tc-user-course-update`,
        method: 'post',
        data:data
    })
}

//用户详情
export function getInfo(data) {
    return request({
        url: `/boss/boss_user/get_by_pk`,
        method: 'get',
        data:data,
        params:data
    })
}
//我的课件详情(BOSS)
export function getCourseInfo(data) {
    return request({
        url: `/boss/tc-user-course/tc-user-course-get`,
        method: 'get',
        data:data,
        params:data
    })
}


//获取AccessToken
export function getToken(data) {
    return request({
        url: `/api/wechat/get-access-token`,
        method: 'get',
        data:data,
        params:data
    })
}

//刷新AccessToken
export function refreshToken(data) {
    return request({
        url: `/api/wechat/refresh-access-token`,
        method: 'get',
        data:data,
        params:data
    })
}

//通过微信Code检查是否绑定手机
export function getPhone(data) {
    return request({
        url: `/api/wechat-login/check-wechat-phone`,
        method: 'get',
        data:data,
        params:data
    })
}

//微信绑定手机
export function bindPhone(data) {
    return request({
        url: `/api/wechat-login/bind-phone`,
        method: 'post',
        data:data,
        params:data
    })
}
//微信绑定手机
export function wxLogin(data) {
    return request({
        url: `/boss/wechat-login`,
        method: 'post',
        data:data,
        params:data
    })
}

